<template>
	<view class="map-echart">
		<view class="echart">
			<l-echart ref="chartRef" @finished="init"></l-echart>
		</view>
	</view>
</template>

<script>
	import * as echarts from '@/utils/echarts.min.js'
	import {
		mapJson
	} from "./js/jilin.js";
	import {
		mixin
	} from "./js/mixin.js"
	export default {
		mixins: [mixin],
		data() {
			return {};
		},
		onLoad() {},
		methods: {
			init() {
				echarts.registerMap('jilin', mapJson);
				this.$refs.chartRef.init(echarts, chart => {
					chart.setOption(this.option)
					chart.on('click', params => {
						console.log(params);
					})
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.map-echart {
		width: 100vw;
		height: 100vh;
	}

	.echart {
		width: 100%;
		height: 50%;
	}
</style>